fix(history): 润色为空时「复制」回退到原文 + 原文面板独立复制入口 (#751)#752
Merged
Conversation
… + copy button on raw panel When polishing returns an empty finalText (errorCode stays null), the History "Copy" button copied an empty string, so the raw transcript that is still visible in the UI could not be recovered. Re-transcribe does not apply here (ASR succeeded; polish is what failed). - onCopy: fall back to rawTranscript when finalText is blank - raw panel: add a dedicated copy button (shown only when rawTranscript exists) - reuse existing common.copy / common.copied, no new i18n; frontend-only Complements Open-Less#653 (polish identical to raw); independent of the in-progress history re-polish work (Open-Less#666/Open-Less#694). No backend/IPC changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
jiangmuran
approved these changes
Jun 27, 2026
jiangmuran
left a comment
Collaborator
There was a problem hiding this comment.
its ok and just ai slop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
摘要
Fixes #751
当润色结果为空(
finalText为空)时,历史页右上「复制」按钮复制的是空字符串,导致 UI 中可见的识别原文无法取回。本 PR 让原文随时可从 UI 取回。改动(仅前端,无后端 / IPC 改动)
src/pages/History.tsx:onCopy:finalText去空白后为空时,回退复制rawTranscript。rawTranscript非空时显示),复制识别原文。common.copy/common.copied,不新增 i18n。不做什么
测试
tsc --noEmit通过。finalText为空的历史记录上:右上「复制」与原文面板「复制」均能取回识别原文;正常记录行为不变(「复制」仍复制润色结果)。PR Type
Bug fix
Description
Copy button falls back to raw transcript when polished text is empty
Added independent copy button on the raw transcript panel
Diagram Walkthrough
flowchart LR A["Copy button clicked"] --> B{"finalText blank?"} B -- "Yes" --> C["Copy rawTranscript"] B -- "No" --> D["Copy finalText"] E["Raw panel copy button"] --> F["Always copy rawTranscript"]File Walkthrough
History.tsx
Fix empty copy and add raw copy buttonopenless-all/app/src/pages/History.tsx